<?php  include $this->admin_tpl('header'); ?>

<script src="<?php echo JS_PATH;?>jquery-1.9.1.min.js"></script>

<script src="<?php echo JS_PATH;?>fullcalendar.min.js"></script>

<script src="<?php echo JS_PATH;?>jquery-ui-1.10.2.custom.min.js"></script>

<link rel="stylesheet" type="text/css" href="<?php echo CSS_PATH;?>fullcalendar.css"/>

<script src="<?php echo JS_PATH;?>layer/layer.js"></script>

<style>

.fc-widget-header{

height: 35px;

line-height:35px;

}

</style>

<div class="content">

	<div class="site"><?php echo C('site_name');?> <a href="#">站点设置</a> > 升值链每日价格设置</div>

	<span class="line_white"></span>

	<div class="install tabs mt10" style="width:60%;margin:0 auto;"><div id='calendar'></div></div>

</div>



<script type="text/javascript">

$(function(){



    $('#calendar').fullCalendar({

        header: {//设置日历头部信息

            left: 'prev,next,today',

            center: 'title',

            right: 'month'

        },

        firstDay:0,//每行第一天为周日

        editable: true,//可以拖动

        height:600,

        events: "<?php echo U('getCalendarJson'); ?>",//展示历史设置的价格

        //设置选项和回调

        dayClick: function(date, allDay, jsEvent, view) {

            var selDate =$.fullCalendar.formatDate(date,'yyyy-MM-dd');//格式化日期

            layer.open({
            
                type: 2,

                title:"设置"+selDate+"日价格",

                /*area: ['300px', '230px'],*/

                area: ['500px', '300px'],

                fixed: false, //不固定

                maxmin: true,

                content: "/index.php?m=admin&c=site&a=calendar&date="+selDate,
                
                cancel:function(index){
		           // window. location.href= window.location.href;
                    layer.close(index)   //
		        }
            });

        }

    })

 })
</script>
<?php include $this->admin_tpl('copyright') ?>